<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="huoyun" uri="/huoyun" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>我的用户中心</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/main.css">
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/style_userCenter.css">
	<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
	<style>
		table th td{
			text-align:center;
		}
	</style>
  </head>
  <body>
	<div>
		<jsp:include page="../nav.jsp">
			<jsp:param value="nav_main" name="nav"/>
		</jsp:include>
	</div>
	<div class="realCer">
	
	<!--主体部分-->
	<div class="realMain clearfix mt10">
	 <!--左侧菜单-->
	<div class="realLeft" id="meunLeft">
	    <jsp:include page="../leftMenu.jsp">
	    	<jsp:param value="con_nav_main" name="con_nav"/>
	    	<jsp:param value="complaintManagement" name="selectMenu"/>
	    </jsp:include>
    </div>
    <!--中由-->
	<div class="realRight ml10">
			<div class="box">
			   <div class="tit">我的投诉列表</div>
			   <div class="con">  
					<table class="listTable" namespace='/complaint'>
						<tr>
							<th width="10%" height="30">被投诉者</th>
							<th width="15%" height="30">投诉类型</th>
							<th width="15%" height="30">投诉目标</th>
							<th width="20%" height="30">投诉原因</th>
							<th width="15%" height="30">投诉时间</th>
							<th width="10%">投诉状态</th>
							<th width="15">操作</th>
						</tr>
						<s:if test="complaintPage">
						<s:iterator var="complaintObj" value="complaintPage.objectList">
						<tr>
							<td><s:property value="#complaintObj.complaintor_id"/></td>		
							<td><s:property value="#complaintObj.type"/></td>
							<td><s:property value="#complaintObj.complainted_id"/></td>
							<td><s:property value="#complaintObj.reason"/></td>
							<td><huoyun:dateFormat date="${complaintObj.add_date }" dateFormat="yyyy-MM-dd HH:mm"/></td>
							
								<s:if test="#complaintObj.status==0">
									<td>等待处理</td>
									<td>
										<a href="<s:url action="preEditComplaint.action" namespace="/complaint"><s:param name='id' value='#complaintObj.id'></s:param></s:url>"> 修改</a>|
										<a href="<s:url action="getComplaintById.action" namespace="/complaint"><s:param name='id' value='#complaintObj.id'></s:param></s:url>">查看</a>|
										<a href="<s:url action="deleteComplaint.action" namespace="/complaint"><s:param name='id' value='#complaintObj.id'></s:param></s:url>">删除</a>
									</td>
								</s:if>
								<s:elseif test="#complaintObj.status==1">
										<td>正在处理</td>
										<td>
											<a href="<s:url action='preEditComplaint.action' namespace='/complaint'><s:param name='id' value='#complaintObj.id'></s:param></s:url>">修改</a>|
											<a href="<s:url action="getComplaintById.action" namespace="/complaint"><s:param name='id' value='#complaintObj.id'></s:param></s:url>">查看</a>
										</td>
								</s:elseif>
								<s:elseif test="#complaintObj.status==2">
									<td>处理结束</td>
									<td>
										<a href="<s:url action="getComplaintById.action" namespace="/complaint"><s:param name='id'><s:property value='complaintObj.id'/></s:param></s:url>">查看</a></td>
									</td>
								</s:elseif>
							</tr>	
							<s:if test="complaintPage.totalPage > 1">
								<tr>
								    <s:url var="queryCargoUrl" action="complaintList.action" namespace="/complaint"></s:url>
									<td colspan="7"><huoyun:page pageNo="${complaintPage.pageNo}" url="${queryCargoUrl}" totalPage="${complaintPage.totalPage}" totalRecord="${complaintPage.totalRecord}"></huoyun:page></td>
								</tr>
							</s:if>				
						</s:iterator> 
						</s:if>
					</table>
			</div>
			<div>
			   		<s:form  method="post" id="preAddcomplaintForm" name="preAddcomplaintForm" action="preAddComplaint" namespace="/complaint">
			   			<input type="submit" class="default_btn" value="添加新的投诉">
			   		</s:form>
			</div>
		</div>
	</div>
	<!--中由-->
</div>
</div>
	<div>
		<jsp:include page="/footer.jsp"></jsp:include>
	</div>
    </body>
</html>